

var aAnswers = new Array( 10 );

aAnswers[ 0 ] = 0; //question 1
aAnswers[ 1 ] = 2; //question 2
aAnswers[ 2 ] = 0; //question 3
aAnswers[ 3 ] = 2; //question 4
aAnswers[ 4 ] = 2; //question 5
aAnswers[ 5 ] = 1; //question 6
aAnswers[ 6 ] = 1; //question 7
aAnswers[ 7 ] = 1; //question 8
aAnswers[ 8 ] = 2; //question 9
aAnswers[ 9 ] = 2; //question 10






function processQuiz()
{
	var aResponses = document.forms.form1.question0;
	
	var nCorrectResponses = 0;
	
	if( aResponses[ aAnswers[ 0 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
		
	aResponses = document.forms.form1.question1;
	
	if( aResponses[ aAnswers[ 1 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
			
	aResponses = document.forms.form1.question2;
	
	if( aResponses[ aAnswers[ 2 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	aResponses = document.forms.form1.question3;
	
	if( aResponses[ aAnswers[ 3 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	aResponses = document.forms.form1.question4;
	
	if( aResponses[ aAnswers[ 4 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}

	aResponses = document.forms.form1.question5;
	
	if( aResponses[ aAnswers[ 5 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	aResponses = document.forms.form1.question6;
	
	if( aResponses[ aAnswers[ 6 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	aResponses = document.forms.form1.question7;
	
	if( aResponses[ aAnswers[ 7 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	aResponses = document.forms.form1.question8;
	
	if( aResponses[ aAnswers[ 8 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	aResponses = document.forms.form1.question9;
	
	if( aResponses[ aAnswers[ 9 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	//window.parent.setScore( nCorrectResponses );
	
	if( nCorrectResponses == 10 )
	{
		
		document.getElementById( "response" ).innerHTML = "You got " + nCorrectResponses + " correct!  Congratulations!! ";
		document.getElementById( "picture1" ).src = "graphics/smiley-face.svg";
		//window.top.content.location = "page-17.html";
		
	}
	
	else
	{
		
		document.getElementById( "response" ).innerHTML = "You got " + nCorrectResponses + " correct!  Please Try Again. ";
		document.getElementById( "picture1" ).src = "graphics/sad-face.svg";
		//window.top.location = "index.html";
		
		
	}
	
	window.parent.setScore( nCorrectResponses * 10 );

}
	
	
			
	